package net.xdlass.exception;

import lombok.Data;
import net.xdlass.enums.BizCodeEnum;
import org.springframework.stereotype.Component;

@Data
public class BizException extends RuntimeException {
    private Integer code;
    private String msg;

    public BizException(BizCodeEnum bizCodeEnum){
        this.code = bizCodeEnum.getCode();
        this.msg = bizCodeEnum.getMessage();
    }
}
